<?php
set_time_limit(0);
if (isset($_POST['nianji']) && isset($_POST['num'])){
    include '../c/config.php';

    $num=addslashes(trim($_POST['num']));
    $nianji=addslashes(trim($_POST['nianji']));
    
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    $table='d6';
    if(6 == $nianji){
        $table='d6';
    }
    if(7 == $nianji){
        $table='d7';
    }
    if(8 == $nianji){
        $table='d8';
    }
    if(9 == $nianji){
        $table='d9';
    } 
    $queryJ=$mysqli->query("SELECT id from `".$table."` where schoolid='".$num."'  limit 0,1 ");
    if($queryJ->num_rows>0){
       echo json_encode(array('s'=>'n'));
    }else{
       echo json_encode(array('s'=>'y'));
    }
    
}else{
    echo json_encode(array('s'=>'n'));
}

?>